package com.ruoyi.employment.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.employment.mapper.HelpReservationMapper;
import com.ruoyi.employment.domain.HelpReservation;
import com.ruoyi.employment.service.IHelpReservationService;

/**
 * 就业服务Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-12-26
 */
@Service
public class HelpReservationServiceImpl implements IHelpReservationService 
{
    @Autowired
    private HelpReservationMapper helpReservationMapper;

    /**
     * 查询就业服务
     * 
     * @param id 就业服务主键
     * @return 就业服务
     */
    @Override
    public HelpReservation selectHelpReservationById(Long id)
    {
        return helpReservationMapper.selectHelpReservationById(id);
    }

    /**
     * 查询就业服务列表
     * 
     * @param helpReservation 就业服务
     * @return 就业服务
     */
    @Override
    public List<HelpReservation> selectHelpReservationList(HelpReservation helpReservation)
    {
        return helpReservationMapper.selectHelpReservationList(helpReservation);
    }

    /**
     * 新增就业服务
     * 
     * @param helpReservation 就业服务
     * @return 结果
     */
    @Override
    public int insertHelpReservation(HelpReservation helpReservation)
    {
        helpReservation.setCreateTime(DateUtils.getNowDate());
        return helpReservationMapper.insertHelpReservation(helpReservation);
    }

    /**
     * 修改就业服务
     * 
     * @param helpReservation 就业服务
     * @return 结果
     */
    @Override
    public int updateHelpReservation(HelpReservation helpReservation)
    {
        return helpReservationMapper.updateHelpReservation(helpReservation);
    }

    /**
     * 批量删除就业服务
     * 
     * @param ids 需要删除的就业服务主键
     * @return 结果
     */
    @Override
    public int deleteHelpReservationByIds(Long[] ids)
    {
        return helpReservationMapper.deleteHelpReservationByIds(ids);
    }

    /**
     * 删除就业服务信息
     * 
     * @param id 就业服务主键
     * @return 结果
     */
    @Override
    public int deleteHelpReservationById(Long id)
    {
        return helpReservationMapper.deleteHelpReservationById(id);
    }
}
